add_subdirectory(__support)

add_subdirectory(complex)
add_subdirectory(ctype)
add_subdirectory(dlfcn)
add_subdirectory(errno)
add_subdirectory(fenv)
add_subdirectory(inttypes)
add_subdirectory(math)
add_subdirectory(stdbit)
add_subdirectory(stdfix)
add_subdirectory(stdio)
add_subdirectory(stdlib)
add_subdirectory(string)
add_subdirectory(wchar)

if(${LIBC_TARGET_OS} STREQUAL "linux")
  add_subdirectory(dirent)
  add_subdirectory(fcntl)
  add_subdirectory(pthread)
  add_subdirectory(sched)
  add_subdirectory(sys)
  add_subdirectory(termios)
  add_subdirectory(unistd)
endif()

if(${LIBC_TARGET_OS} STREQUAL "gpu")
  add_subdirectory(gpu)
endif()

if(NOT LLVM_LIBC_FULL_BUILD)
  return()
endif()

add_subdirectory(assert)
add_subdirectory(compiler)
add_subdirectory(network)
add_subdirectory(search)
add_subdirectory(setjmp)
add_subdirectory(signal)
add_subdirectory(spawn)
add_subdirectory(threads)
add_subdirectory(time)
add_subdirectory(locale)
